package com.ljp.order.rabbitmq.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MqListener {

    // 要提前创建对应的queue 和exchange
    @RabbitListener(queues = "test.order")
    public void listenDriverOrder(String msg) {

        log.info("receive a message:" + msg);
    }

}
